<%-- 
    Document   : view
    Created on : 2024年12月11日, 下午1:56:09
    Author     : 20204
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/ueditor.all.js"></script>
    <script type="text/javascript" charset="utf-8" src="../ueditor/lang/zh-cn/zh-cn.js"></script>
</head>

<body>
    <main>
        <h1>发表帖子</h1>
    <form action="http://localhost:8080/luntan/Post" method="post">
        <!-- 添加帖子标题输入框 -->
        <label for="title">帖子标题：</label><input type="text" id="title" name="title" required><br>

        <div>
            <script id="editor" type="text/plain" style="width: 80%; height: 500px;"></script>
        </div>
        <label for="post-author">作者：</label><br>
            <input type="text" id="post-author" name="author" value="${sessionScope.username}" required readonly><br><br>
    
        
        <label for="category">分类：</label><br>
            <select id="post-category" name="category">
                <option value="校园生活">校园生活</option>
                <option value="社团活动">社团活动</option>
            </select><br><br>
            <input type="submit" value="提交" />
    </form>
    <script type="text/javascript">
        // 实例化编辑器
        var ue = UE.getEditor('editor');
        var category = document.querySelector('#post-category').value;
    </script>
</body>

</html>


